<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE BangPatterns, NoImplicitPrelude, RecordWildCards #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Event.IntTable</span><span>
</span><span id="line-7"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-8"></span><span>      </span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier">IntTable</span></a></span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#new"><span class="hs-identifier">new</span></a></span><span>
</span><span id="line-10"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#lookup"><span class="hs-identifier">lookup</span></a></span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#insertWith"><span class="hs-identifier">insertWith</span></a></span><span>
</span><span id="line-12"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#reset"><span class="hs-identifier">reset</span></a></span><span>
</span><span id="line-13"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#delete"><span class="hs-identifier">delete</span></a></span><span>
</span><span id="line-14"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#updateWith"><span class="hs-identifier">updateWith</span></a></span><span>
</span><span id="line-15"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Bits.html"><span class="hs-identifier">Data.Bits</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Bits.html#.%26."><span class="hs-operator">(.&amp;.)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bits.html#shiftL"><span class="hs-identifier">shiftL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Bits.html#shiftR"><span class="hs-identifier">shiftR</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.IORef.html"><span class="hs-identifier">Data.IORef</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IORef.html#IORef"><span class="hs-identifier">IORef</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IORef.html#newIORef"><span class="hs-identifier">newIORef</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IORef.html#readIORef"><span class="hs-identifier">readIORef</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IORef.html#writeIORef"><span class="hs-identifier">writeIORef</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Maybe.html"><span class="hs-identifier">Data.Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier">Maybe</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Maybe.html#isJust"><span class="hs-identifier">isJust</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Foreign.ForeignPtr.html"><span class="hs-identifier">Foreign.ForeignPtr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.ForeignPtr.html#ForeignPtr"><span class="hs-identifier">ForeignPtr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.ForeignPtr.html#mallocForeignPtr"><span class="hs-identifier">mallocForeignPtr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.ForeignPtr.html"><span class="hs-identifier">GHC.ForeignPtr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.ForeignPtr.html#unsafeWithForeignPtr"><span class="hs-identifier">unsafeWithForeignPtr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Foreign.Storable.html"><span class="hs-identifier">Foreign.Storable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Foreign.Storable.html#peek"><span class="hs-identifier">peek</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Foreign.Storable.html#poke"><span class="hs-identifier">poke</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier">Monad</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#%3D%3C%3C"><span class="hs-operator">(=&lt;&lt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#%24"><span class="hs-operator">($)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#%24%21"><span class="hs-operator">($!)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#const"><span class="hs-identifier">const</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#liftM"><span class="hs-identifier">liftM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#otherwise"><span class="hs-identifier">otherwise</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#when"><span class="hs-identifier">when</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#"><span class="hs-identifier">GHC.Classes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier">Eq</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier">Ord</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Event.Arr.html"><span class="hs-identifier">GHC.Event.Arr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier">Arr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier">Num</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#"><span class="hs-identifier">GHC.Prim</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-identifier">seq</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#"><span class="hs-identifier">GHC.Types</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier">Bool</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier">IO</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier">Int</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Event.Arr.html"><span class="hs-identifier">GHC.Event.Arr</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Arr</span></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-comment">-- A very simple chained integer-keyed mutable hash table. We use</span><span>
</span><span id="line-32"></span><span class="hs-comment">-- power-of-two sizing, grow at a load factor of 0.75, and never</span><span>
</span><span id="line-33"></span><span class="hs-comment">-- shrink. The &quot;hash function&quot; is the identity function.</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">newtype</span><span> </span><span id="IntTable"><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-var">IntTable</span></a></span></span><span> </span><span id="local-6989586621679552662"><span class="annot"><a href="#local-6989586621679552662"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="IntTable"><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-var">IntTable</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IORef.html#IORef"><span class="hs-identifier hs-type">IORef</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552662"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-keyword">data</span><span> </span><span id="IT"><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-var">IT</span></a></span></span><span> </span><span id="local-6989586621679552691"><span class="annot"><a href="#local-6989586621679552691"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="IT"><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-var">IT</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-38"></span><span>      </span><span id="tabArr"><span class="annot"><span class="annottext">forall a. IT a -&gt; Arr (Bucket a)
</span><a href="GHC.Event.IntTable.html#tabArr"><span class="hs-identifier hs-var hs-var">tabArr</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Arr.html#Arr"><span class="hs-identifier hs-type">Arr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-type">Bucket</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552691"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="tabSize"><span class="annot"><span class="annottext">forall a. IT a -&gt; ForeignPtr Int
</span><a href="GHC.Event.IntTable.html#tabSize"><span class="hs-identifier hs-var hs-var">tabSize</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="GHC.ForeignPtr.html#ForeignPtr"><span class="hs-identifier hs-type">ForeignPtr</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-keyword">data</span><span> </span><span id="Bucket"><span class="annot"><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-var">Bucket</span></a></span></span><span> </span><span id="local-6989586621679552684"><span class="annot"><a href="#local-6989586621679552684"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Empty"><span class="annot"><a href="GHC.Event.IntTable.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span></span><span>
</span><span id="line-43"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="Bucket"><span class="annot"><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-var">Bucket</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-44"></span><span>      </span><span id="bucketKey"><span class="annot"><span class="annottext">forall a. Bucket a -&gt; Int
</span><a href="GHC.Event.IntTable.html#bucketKey"><span class="hs-identifier hs-var hs-var">bucketKey</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="bucketValue"><span class="annot"><span class="annottext">forall a. Bucket a -&gt; a
</span><a href="GHC.Event.IntTable.html#bucketValue"><span class="hs-identifier hs-var hs-var">bucketValue</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679552684"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="bucketNext"><span class="annot"><span class="annottext">forall a. Bucket a -&gt; Bucket a
</span><a href="GHC.Event.IntTable.html#bucketNext"><span class="hs-identifier hs-var hs-var">bucketNext</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-type">Bucket</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552684"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span id="local-6989586621679552678"><span class="annot"><a href="GHC.Event.IntTable.html#lookup"><span class="hs-identifier hs-type">lookup</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-type">IntTable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552678"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552678"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-50"></span><span id="lookup"><span class="annot"><span class="annottext">lookup :: forall a. Int -&gt; IntTable a -&gt; IO (Maybe a)
</span><a href="GHC.Event.IntTable.html#lookup"><span class="hs-identifier hs-var hs-var">lookup</span></a></span></span><span> </span><span id="local-6989586621679552585"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552585"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-type">IntTable</span></a></span><span> </span><span id="local-6989586621679552584"><span class="annot"><span class="annottext">IORef (IT a)
</span><a href="#local-6989586621679552584"><span class="hs-identifier hs-var">ref</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-51"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679552581"><span class="annot"><span class="annottext">go :: Bucket a -&gt; Maybe a
</span><a href="#local-6989586621679552581"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-type">Bucket</span></a></span><span class="hs-special">{</span><span id="local-6989586621679552578"><span id="local-6989586621679552579"><span id="local-6989586621679552580"><span class="annot"><span class="annottext">a
Int
Bucket a
bucketNext :: Bucket a
bucketValue :: a
bucketKey :: Int
bucketNext :: forall a. Bucket a -&gt; Bucket a
bucketValue :: forall a. Bucket a -&gt; a
bucketKey :: forall a. Bucket a -&gt; Int
</span><a href="#local-6989586621679552578"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span><span class="hs-special">}</span><span>
</span><span id="line-52"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552580"><span class="hs-identifier hs-var">bucketKey</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552585"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552579"><span class="hs-identifier hs-var">bucketValue</span></a></span><span>
</span><span id="line-53"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a -&gt; Maybe a
</span><a href="#local-6989586621679552581"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552578"><span class="hs-identifier hs-var">bucketNext</span></a></span><span>
</span><span id="line-54"></span><span>      </span><span class="annot"><a href="#local-6989586621679552581"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-55"></span><span>  </span><span id="local-6989586621679552577"><span class="annot"><span class="annottext">it :: IT a
</span><a href="#local-6989586621679552577"><span class="hs-identifier hs-var">it</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span class="hs-special">{</span><span id="local-6989586621679552575"><span id="local-6989586621679552576"><span class="annot"><span class="annottext">Arr (Bucket a)
ForeignPtr Int
tabSize :: ForeignPtr Int
tabArr :: Arr (Bucket a)
tabSize :: forall a. IT a -&gt; ForeignPtr Int
tabArr :: forall a. IT a -&gt; Arr (Bucket a)
</span><a href="#local-6989586621679552575"><span class="hs-glyph hs-var hs-var hs-var hs-var">..</span></a></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IORef (IT a) -&gt; IO (IT a)
forall a. IORef a -&gt; IO a
</span><a href="GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef (IT a)
</span><a href="#local-6989586621679552584"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-56"></span><span>  </span><span id="local-6989586621679552574"><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552574"><span class="hs-identifier hs-var">bkt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int -&gt; IO (Bucket a)
forall a. Arr a -&gt; Int -&gt; IO a
</span><a href="GHC.Event.Arr.html#read"><span class="hs-identifier hs-var">Arr.read</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552576"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; IT a -&gt; Int
forall a. Int -&gt; IT a -&gt; Int
</span><a href="GHC.Event.IntTable.html#indexOf"><span class="hs-identifier hs-var">indexOf</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552585"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552577"><span class="hs-identifier hs-var">it</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span>  </span><span class="annot"><span class="annottext">Maybe a -&gt; IO (Maybe a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe a -&gt; IO (Maybe a)) -&gt; Maybe a -&gt; IO (Maybe a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a -&gt; Maybe a
forall {a}. Bucket a -&gt; Maybe a
</span><a href="#local-6989586621679552581"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552574"><span class="hs-identifier hs-var">bkt</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span id="local-6989586621679552664"><span class="annot"><a href="GHC.Event.IntTable.html#new"><span class="hs-identifier hs-type">new</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-type">IntTable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552664"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-60"></span><span id="new"><span class="annot"><span class="annottext">new :: forall a. Int -&gt; IO (IntTable a)
</span><a href="GHC.Event.IntTable.html#new"><span class="hs-identifier hs-var hs-var">new</span></a></span></span><span> </span><span id="local-6989586621679552569"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552569"><span class="hs-identifier hs-var">capacity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IORef (IT a) -&gt; IntTable a
forall a. IORef (IT a) -&gt; IntTable a
</span><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-var">IntTable</span></a></span><span> </span><span class="annot"><span class="annottext">(IORef (IT a) -&gt; IntTable a)
-&gt; IO (IORef (IT a)) -&gt; IO (IntTable a)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="GHC.Base.html#liftM"><span class="hs-operator hs-var">`liftM`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IT a -&gt; IO (IORef (IT a))
forall a. a -&gt; IO (IORef a)
</span><a href="GHC.IORef.html#newIORef"><span class="hs-identifier hs-var">newIORef</span></a></span><span> </span><span class="annot"><span class="annottext">(IT a -&gt; IO (IORef (IT a))) -&gt; IO (IT a) -&gt; IO (IORef (IT a))
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; IO (IT a)
forall a. Int -&gt; IO (IT a)
</span><a href="GHC.Event.IntTable.html#new_"><span class="hs-identifier hs-var">new_</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552569"><span class="hs-identifier hs-var">capacity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span id="local-6989586621679552654"><span class="annot"><a href="GHC.Event.IntTable.html#new_"><span class="hs-identifier hs-type">new_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552654"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-63"></span><span id="new_"><span class="annot"><span class="annottext">new_ :: forall a. Int -&gt; IO (IT a)
</span><a href="GHC.Event.IntTable.html#new_"><span class="hs-identifier hs-var hs-var">new_</span></a></span></span><span> </span><span id="local-6989586621679552558"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552558"><span class="hs-identifier hs-var">capacity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-64"></span><span>  </span><span id="local-6989586621679552557"><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552557"><span class="hs-identifier hs-var">arr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bucket a -&gt; Int -&gt; IO (Arr (Bucket a))
forall a. a -&gt; Int -&gt; IO (Arr a)
</span><a href="GHC.Event.Arr.html#new"><span class="hs-identifier hs-var">Arr.new</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
forall a. Bucket a
</span><a href="GHC.Event.IntTable.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552558"><span class="hs-identifier hs-var">capacity</span></a></span><span>
</span><span id="line-65"></span><span>  </span><span id="local-6989586621679552555"><span class="annot"><span class="annottext">ForeignPtr Int
</span><a href="#local-6989586621679552555"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (ForeignPtr Int)
forall a. Storable a =&gt; IO (ForeignPtr a)
</span><a href="GHC.ForeignPtr.html#mallocForeignPtr"><span class="hs-identifier hs-var">mallocForeignPtr</span></a></span><span>
</span><span id="line-66"></span><span>  </span><span class="annot"><span class="annottext">ForeignPtr Int -&gt; (Ptr Int -&gt; IO ()) -&gt; IO ()
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="GHC.ForeignPtr.html#unsafeWithForeignPtr"><span class="hs-identifier hs-var">unsafeWithForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Int
</span><a href="#local-6989586621679552555"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr Int -&gt; IO ()) -&gt; IO ()) -&gt; (Ptr Int -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679552554"><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552554"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr Int -&gt; Int -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552554"><span class="hs-identifier hs-var">ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-67"></span><span>  </span><span class="annot"><span class="annottext">IT a -&gt; IO (IT a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">IT :: forall a. Arr (Bucket a) -&gt; ForeignPtr Int -&gt; IT a
</span><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">tabArr :: Arr (Bucket a)
</span><a href="GHC.Event.IntTable.html#tabArr"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552557"><span class="hs-identifier hs-var">arr</span></a></span><span>
</span><span id="line-68"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">tabSize :: ForeignPtr Int
</span><a href="GHC.Event.IntTable.html#tabSize"><span class="hs-identifier hs-var">tabSize</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignPtr Int
</span><a href="#local-6989586621679552555"><span class="hs-identifier hs-var">size</span></a></span><span>
</span><span id="line-69"></span><span>            </span><span class="hs-special">}</span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span id="local-6989586621679552646"><span class="annot"><a href="GHC.Event.IntTable.html#grow"><span class="hs-identifier hs-type">grow</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552646"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IORef.html#IORef"><span class="hs-identifier hs-type">IORef</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552646"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-72"></span><span id="grow"><span class="annot"><span class="annottext">grow :: forall a. IT a -&gt; IORef (IT a) -&gt; Int -&gt; IO ()
</span><a href="GHC.Event.IntTable.html#grow"><span class="hs-identifier hs-var hs-var">grow</span></a></span></span><span> </span><span id="local-6989586621679552546"><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552546"><span class="hs-identifier hs-var">oldit</span></a></span></span><span> </span><span id="local-6989586621679552545"><span class="annot"><span class="annottext">IORef (IT a)
</span><a href="#local-6989586621679552545"><span class="hs-identifier hs-var">ref</span></a></span></span><span> </span><span id="local-6989586621679552544"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552544"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-73"></span><span>  </span><span id="local-6989586621679552543"><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552543"><span class="hs-identifier hs-var">newit</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IO (IT a)
forall a. Int -&gt; IO (IT a)
</span><a href="GHC.Event.IntTable.html#new_"><span class="hs-identifier hs-var">new_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int
forall a. Arr a -&gt; Int
</span><a href="GHC.Event.Arr.html#size"><span class="hs-identifier hs-var">Arr.size</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IT a -&gt; Arr (Bucket a)
forall a. IT a -&gt; Arr (Bucket a)
</span><a href="GHC.Event.IntTable.html#tabArr"><span class="hs-identifier hs-var hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552546"><span class="hs-identifier hs-var">oldit</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679552538"><span class="annot"><span class="annottext">copySlot :: Int -&gt; Int -&gt; IO ()
</span><a href="#local-6989586621679552538"><span class="hs-identifier hs-var hs-var">copySlot</span></a></span></span><span> </span><span id="local-6989586621679552537"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552537"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679552536"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552536"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-75"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552537"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552544"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-77"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679552529"><span class="annot"><span class="annottext">copyBucket :: Int -&gt; Bucket a -&gt; IO ()
</span><a href="#local-6989586621679552529"><span class="hs-identifier hs-var hs-var">copyBucket</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679552528"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552528"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="GHC.Event.IntTable.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO ()
</span><a href="#local-6989586621679552538"><span class="hs-identifier hs-var">copySlot</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552528"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552536"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span>              </span><span class="annot"><a href="#local-6989586621679552529"><span class="hs-identifier hs-var">copyBucket</span></a></span><span>  </span><span id="local-6989586621679552526"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552526"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679552525"><span class="annot"><span class="annottext">bkt :: Bucket a
</span><a href="#local-6989586621679552525"><span class="hs-identifier hs-var">bkt</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-type">Bucket</span></a></span><span class="hs-special">{</span><span id="local-6989586621679552522"><span id="local-6989586621679552523"><span id="local-6989586621679552524"><span class="annot"><span class="annottext">a
Int
Bucket a
bucketNext :: Bucket a
bucketValue :: a
bucketKey :: Int
bucketNext :: forall a. Bucket a -&gt; Bucket a
bucketValue :: forall a. Bucket a -&gt; a
bucketKey :: forall a. Bucket a -&gt; Int
</span><a href="#local-6989586621679552522"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-79"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679552521"><span class="annot"><span class="annottext">idx :: Int
</span><a href="#local-6989586621679552521"><span class="hs-identifier hs-var hs-var">idx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IT a -&gt; Int
forall a. Int -&gt; IT a -&gt; Int
</span><a href="GHC.Event.IntTable.html#indexOf"><span class="hs-identifier hs-var">indexOf</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552524"><span class="hs-identifier hs-var">bucketKey</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552543"><span class="hs-identifier hs-var">newit</span></a></span><span>
</span><span id="line-80"></span><span>                </span><span id="local-6989586621679552520"><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552520"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int -&gt; IO (Bucket a)
forall a. Arr a -&gt; Int -&gt; IO a
</span><a href="GHC.Event.Arr.html#read"><span class="hs-identifier hs-var">Arr.read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IT a -&gt; Arr (Bucket a)
forall a. IT a -&gt; Arr (Bucket a)
</span><a href="GHC.Event.IntTable.html#tabArr"><span class="hs-identifier hs-var hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552543"><span class="hs-identifier hs-var">newit</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552521"><span class="hs-identifier hs-var">idx</span></a></span><span>
</span><span id="line-81"></span><span>                </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int -&gt; Bucket a -&gt; IO ()
forall a. Arr a -&gt; Int -&gt; a -&gt; IO ()
</span><a href="GHC.Event.Arr.html#write"><span class="hs-identifier hs-var">Arr.write</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IT a -&gt; Arr (Bucket a)
forall a. IT a -&gt; Arr (Bucket a)
</span><a href="GHC.Event.IntTable.html#tabArr"><span class="hs-identifier hs-var hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552543"><span class="hs-identifier hs-var">newit</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552521"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552525"><span class="hs-identifier hs-var">bkt</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bucketNext :: Bucket a
</span><a href="GHC.Event.IntTable.html#bucketNext"><span class="hs-identifier hs-var">bucketNext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552520"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-82"></span><span>                </span><span class="annot"><span class="annottext">Int -&gt; Bucket a -&gt; IO ()
</span><a href="#local-6989586621679552529"><span class="hs-identifier hs-var">copyBucket</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552526"><span class="hs-identifier hs-var">m</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552522"><span class="hs-identifier hs-var">bucketNext</span></a></span><span>
</span><span id="line-83"></span><span>          </span><span class="annot"><span class="annottext">Int -&gt; Bucket a -&gt; IO ()
</span><a href="#local-6989586621679552529"><span class="hs-identifier hs-var">copyBucket</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552537"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">(Bucket a -&gt; IO ()) -&gt; IO (Bucket a) -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int -&gt; IO (Bucket a)
forall a. Arr a -&gt; Int -&gt; IO a
</span><a href="GHC.Event.Arr.html#read"><span class="hs-identifier hs-var">Arr.read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IT a -&gt; Arr (Bucket a)
forall a. IT a -&gt; Arr (Bucket a)
</span><a href="GHC.Event.IntTable.html#tabArr"><span class="hs-identifier hs-var hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552546"><span class="hs-identifier hs-var">oldit</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552536"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-84"></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; IO ()
</span><a href="#local-6989586621679552538"><span class="hs-identifier hs-var">copySlot</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-85"></span><span>  </span><span class="annot"><span class="annottext">ForeignPtr Int -&gt; (Ptr Int -&gt; IO ()) -&gt; IO ()
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="GHC.ForeignPtr.html#unsafeWithForeignPtr"><span class="hs-identifier hs-var">unsafeWithForeignPtr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IT a -&gt; ForeignPtr Int
forall a. IT a -&gt; ForeignPtr Int
</span><a href="GHC.Event.IntTable.html#tabSize"><span class="hs-identifier hs-var hs-var">tabSize</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552543"><span class="hs-identifier hs-var">newit</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((Ptr Int -&gt; IO ()) -&gt; IO ()) -&gt; (Ptr Int -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679552518"><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552518"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr Int -&gt; Int -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552518"><span class="hs-identifier hs-var">ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552544"><span class="hs-identifier hs-var">size</span></a></span><span>
</span><span id="line-86"></span><span>  </span><span class="annot"><span class="annottext">IORef (IT a) -&gt; IT a -&gt; IO ()
forall a. IORef a -&gt; a -&gt; IO ()
</span><a href="GHC.IORef.html#writeIORef"><span class="hs-identifier hs-var">writeIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef (IT a)
</span><a href="#local-6989586621679552545"><span class="hs-identifier hs-var">ref</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552543"><span class="hs-identifier hs-var">newit</span></a></span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="hs-comment">-- | @insertWith f k v table@ inserts @k@ into @table@ with value @v@.</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- If @k@ already appears in @table@ with value @v0@, the value is updated</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- to @f v0 v@ and @Just v0@ is returned.</span><span>
</span><span id="line-91"></span><span id="local-6989586621679552638"><span class="annot"><a href="GHC.Event.IntTable.html#insertWith"><span class="hs-identifier hs-type">insertWith</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679552638"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679552638"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679552638"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679552638"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-type">IntTable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552638"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552638"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-92"></span><span id="insertWith"><span class="annot"><span class="annottext">insertWith :: forall a. (a -&gt; a -&gt; a) -&gt; Int -&gt; a -&gt; IntTable a -&gt; IO (Maybe a)
</span><a href="GHC.Event.IntTable.html#insertWith"><span class="hs-identifier hs-var hs-var">insertWith</span></a></span></span><span> </span><span id="local-6989586621679552515"><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679552515"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679552514"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552514"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679552513"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552513"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679552512"><span class="annot"><span class="annottext">inttable :: IntTable a
</span><a href="#local-6989586621679552512"><span class="hs-identifier hs-var">inttable</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-type">IntTable</span></a></span><span> </span><span id="local-6989586621679552511"><span class="annot"><span class="annottext">IORef (IT a)
</span><a href="#local-6989586621679552511"><span class="hs-identifier hs-var">ref</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-93"></span><span>  </span><span id="local-6989586621679552510"><span class="annot"><span class="annottext">it :: IT a
</span><a href="#local-6989586621679552510"><span class="hs-identifier hs-var">it</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span class="hs-special">{</span><span id="local-6989586621679552508"><span id="local-6989586621679552509"><span class="annot"><span class="annottext">Arr (Bucket a)
ForeignPtr Int
tabSize :: ForeignPtr Int
tabArr :: Arr (Bucket a)
tabSize :: forall a. IT a -&gt; ForeignPtr Int
tabArr :: forall a. IT a -&gt; Arr (Bucket a)
</span><a href="#local-6989586621679552508"><span class="hs-glyph hs-var hs-var hs-var hs-var">..</span></a></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IORef (IT a) -&gt; IO (IT a)
forall a. IORef a -&gt; IO a
</span><a href="GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef (IT a)
</span><a href="#local-6989586621679552511"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-94"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679552507"><span class="annot"><span class="annottext">idx :: Int
</span><a href="#local-6989586621679552507"><span class="hs-identifier hs-var hs-var">idx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IT a -&gt; Int
forall a. Int -&gt; IT a -&gt; Int
</span><a href="GHC.Event.IntTable.html#indexOf"><span class="hs-identifier hs-var">indexOf</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552514"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552510"><span class="hs-identifier hs-var">it</span></a></span><span>
</span><span id="line-95"></span><span>      </span><span id="local-6989586621679552488"><span class="annot"><span class="annottext">go :: Bucket a -&gt; Bucket a -&gt; IO (Maybe a)
</span><a href="#local-6989586621679552488"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679552487"><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552487"><span class="hs-identifier hs-var">seen</span></a></span></span><span> </span><span id="local-6989586621679552486"><span class="annot"><span class="annottext">bkt :: Bucket a
</span><a href="#local-6989586621679552486"><span class="hs-identifier hs-var">bkt</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-type">Bucket</span></a></span><span class="hs-special">{</span><span id="local-6989586621679552483"><span id="local-6989586621679552484"><span id="local-6989586621679552485"><span class="annot"><span class="annottext">a
Int
Bucket a
bucketNext :: Bucket a
bucketValue :: a
bucketKey :: Int
bucketNext :: forall a. Bucket a -&gt; Bucket a
bucketValue :: forall a. Bucket a -&gt; a
bucketKey :: forall a. Bucket a -&gt; Int
</span><a href="#local-6989586621679552483"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span><span class="hs-special">}</span><span>
</span><span id="line-96"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552485"><span class="hs-identifier hs-var">bucketKey</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552514"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-97"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679552482"><span class="annot"><span class="annottext">v' :: a
</span><a href="#local-6989586621679552482"><span class="hs-identifier hs-var hs-var">v'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679552515"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552513"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552484"><span class="hs-identifier hs-var">bucketValue</span></a></span><span>
</span><span id="line-98"></span><span>              </span><span class="hs-glyph">!</span><span id="local-6989586621679552481"><span class="annot"><span class="annottext">next :: Bucket a
</span><a href="#local-6989586621679552481"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552487"><span class="hs-identifier hs-var">seen</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a -&gt; Bucket a -&gt; Bucket a
forall {a}. Bucket a -&gt; Bucket a -&gt; Bucket a
</span><a href="#local-6989586621679552480"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552483"><span class="hs-identifier hs-var">bucketNext</span></a></span><span>
</span><span id="line-99"></span><span>              </span><span class="annot"><span class="annottext">Bucket a
</span><a href="GHC.Event.IntTable.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>        </span><span id="local-6989586621679552480"><span class="annot"><span class="annottext">&lt;&gt; :: Bucket a -&gt; Bucket a -&gt; Bucket a
</span><a href="#local-6989586621679552480"><span class="hs-operator hs-var hs-var">&lt;&gt;</span></a></span></span><span> </span><span id="local-6989586621679552479"><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552479"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552479"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-100"></span><span>              </span><span id="local-6989586621679552478"><span class="annot"><span class="annottext">b :: Bucket a
</span><a href="#local-6989586621679552478"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-type">Bucket</span></a></span><span class="hs-special">{</span><span id="local-6989586621679552475"><span id="local-6989586621679552476"><span id="local-6989586621679552477"><span class="annot"><span class="annottext">a
Int
Bucket a
bucketNext :: Bucket a
bucketValue :: a
bucketKey :: Int
bucketNext :: forall a. Bucket a -&gt; Bucket a
bucketValue :: forall a. Bucket a -&gt; a
bucketKey :: forall a. Bucket a -&gt; Int
</span><a href="#local-6989586621679552475"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span><span class="hs-special">}</span><span> </span><span class="annot"><a href="#local-6989586621679552480"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span id="local-6989586621679552474"><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552474"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552478"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bucketNext :: Bucket a
</span><a href="GHC.Event.IntTable.html#bucketNext"><span class="hs-identifier hs-var">bucketNext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552475"><span class="hs-identifier hs-var">bucketNext</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a -&gt; Bucket a -&gt; Bucket a
</span><a href="#local-6989586621679552480"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552474"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-101"></span><span>          </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int -&gt; Bucket a -&gt; IO ()
forall a. Arr a -&gt; Int -&gt; a -&gt; IO ()
</span><a href="GHC.Event.Arr.html#write"><span class="hs-identifier hs-var">Arr.write</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552509"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552507"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; a -&gt; Bucket a -&gt; Bucket a
forall a. Int -&gt; a -&gt; Bucket a -&gt; Bucket a
</span><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-var">Bucket</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552514"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552482"><span class="hs-identifier hs-var">v'</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552481"><span class="hs-identifier hs-var">next</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-102"></span><span>          </span><span class="annot"><span class="annottext">Maybe a -&gt; IO (Maybe a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552484"><span class="hs-identifier hs-var">bucketValue</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a -&gt; Bucket a -&gt; IO (Maybe a)
</span><a href="#local-6989586621679552488"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552486"><span class="hs-identifier hs-var">bkt</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bucketNext :: Bucket a
</span><a href="GHC.Event.IntTable.html#bucketNext"><span class="hs-identifier hs-var">bucketNext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552487"><span class="hs-identifier hs-var">seen</span></a></span><span> </span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552483"><span class="hs-identifier hs-var">bucketNext</span></a></span><span>
</span><span id="line-104"></span><span>      </span><span class="annot"><a href="#local-6989586621679552488"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679552473"><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552473"><span class="hs-identifier hs-var">seen</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignPtr Int -&gt; (Ptr Int -&gt; IO (Maybe a)) -&gt; IO (Maybe a)
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="GHC.ForeignPtr.html#unsafeWithForeignPtr"><span class="hs-identifier hs-var">unsafeWithForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Int
</span><a href="#local-6989586621679552508"><span class="hs-identifier hs-var">tabSize</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr Int -&gt; IO (Maybe a)) -&gt; IO (Maybe a))
-&gt; (Ptr Int -&gt; IO (Maybe a)) -&gt; IO (Maybe a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679552472"><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552472"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-105"></span><span>        </span><span id="local-6989586621679552471"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552471"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ptr Int -&gt; IO Int
forall a. Storable a =&gt; Ptr a -&gt; IO a
</span><a href="Foreign.Storable.html#peek"><span class="hs-identifier hs-var">peek</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552472"><span class="hs-identifier hs-var">ptr</span></a></span><span>
</span><span id="line-106"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552471"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int
forall a. Arr a -&gt; Int
</span><a href="GHC.Event.Arr.html#size"><span class="hs-identifier hs-var">Arr.size</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552509"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int
forall a. Arr a -&gt; Int
</span><a href="GHC.Event.Arr.html#size"><span class="hs-identifier hs-var">Arr.size</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552509"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span>          </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IT a -&gt; IORef (IT a) -&gt; Int -&gt; IO ()
forall a. IT a -&gt; IORef (IT a) -&gt; Int -&gt; IO ()
</span><a href="GHC.Event.IntTable.html#grow"><span class="hs-identifier hs-var">grow</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552510"><span class="hs-identifier hs-var">it</span></a></span><span> </span><span class="annot"><span class="annottext">IORef (IT a)
</span><a href="#local-6989586621679552511"><span class="hs-identifier hs-var">ref</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552471"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO (Maybe a) -&gt; IO (Maybe a)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; Int -&gt; a -&gt; IntTable a -&gt; IO (Maybe a)
forall a. (a -&gt; a -&gt; a) -&gt; Int -&gt; a -&gt; IntTable a -&gt; IO (Maybe a)
</span><a href="GHC.Event.IntTable.html#insertWith"><span class="hs-identifier hs-var">insertWith</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679552515"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552514"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552513"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">IntTable a
</span><a href="#local-6989586621679552512"><span class="hs-identifier hs-var">inttable</span></a></span><span>
</span><span id="line-108"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-109"></span><span>            </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552513"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; IO () -&gt; IO ()
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int -&gt; Bucket a -&gt; IO ()
forall a. Arr a -&gt; Int -&gt; a -&gt; IO ()
</span><a href="GHC.Event.Arr.html#write"><span class="hs-identifier hs-var">Arr.write</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552509"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552507"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; a -&gt; Bucket a -&gt; Bucket a
forall a. Int -&gt; a -&gt; Bucket a -&gt; Bucket a
</span><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-var">Bucket</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552514"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552513"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552473"><span class="hs-identifier hs-var">seen</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>            </span><span class="annot"><span class="annottext">Ptr Int -&gt; Int -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552472"><span class="hs-identifier hs-var">ptr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552471"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-111"></span><span>            </span><span class="annot"><span class="annottext">Maybe a -&gt; IO (Maybe a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-112"></span><span>  </span><span class="annot"><span class="annottext">Bucket a -&gt; Bucket a -&gt; IO (Maybe a)
</span><a href="#local-6989586621679552488"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
forall a. Bucket a
</span><a href="GHC.Event.IntTable.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">(Bucket a -&gt; IO (Maybe a)) -&gt; IO (Bucket a) -&gt; IO (Maybe a)
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int -&gt; IO (Bucket a)
forall a. Arr a -&gt; Int -&gt; IO a
</span><a href="GHC.Event.Arr.html#read"><span class="hs-identifier hs-var">Arr.read</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552509"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552507"><span class="hs-identifier hs-var">idx</span></a></span><span>
</span><span id="line-113"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#insertWith"><span class="hs-pragma hs-type">insertWith</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span class="hs-comment">-- | Used to undo the effect of a prior insertWith.</span><span>
</span><span id="line-116"></span><span id="local-6989586621679552630"><span class="annot"><a href="GHC.Event.IntTable.html#reset"><span class="hs-identifier hs-type">reset</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552630"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-type">IntTable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552630"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-117"></span><span id="reset"><span class="annot"><span class="annottext">reset :: forall a. Int -&gt; Maybe a -&gt; IntTable a -&gt; IO ()
</span><a href="GHC.Event.IntTable.html#reset"><span class="hs-identifier hs-var hs-var">reset</span></a></span></span><span> </span><span id="local-6989586621679552466"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552466"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679552465"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552465"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679552464"><span class="annot"><span class="annottext">IntTable a
</span><a href="#local-6989586621679552464"><span class="hs-identifier hs-var">tbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; Int -&gt; a -&gt; IntTable a -&gt; IO (Maybe a)
forall a. (a -&gt; a -&gt; a) -&gt; Int -&gt; a -&gt; IntTable a -&gt; IO (Maybe a)
</span><a href="GHC.Event.IntTable.html#insertWith"><span class="hs-identifier hs-var">insertWith</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552466"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552465"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">IntTable a
</span><a href="#local-6989586621679552464"><span class="hs-identifier hs-var">tbl</span></a></span><span> </span><span class="annot"><span class="annottext">IO (Maybe a) -&gt; IO () -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span class="annot"><a href="GHC.Event.IntTable.html#reset"><span class="hs-identifier hs-var">reset</span></a></span><span> </span><span id="local-6989586621679552463"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552463"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span id="local-6989586621679552462"><span class="annot"><span class="annottext">IntTable a
</span><a href="#local-6989586621679552462"><span class="hs-identifier hs-var">tbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IntTable a -&gt; IO (Maybe a)
forall a. Int -&gt; IntTable a -&gt; IO (Maybe a)
</span><a href="GHC.Event.IntTable.html#delete"><span class="hs-identifier hs-var">delete</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552463"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">IntTable a
</span><a href="#local-6989586621679552462"><span class="hs-identifier hs-var">tbl</span></a></span><span> </span><span class="annot"><span class="annottext">IO (Maybe a) -&gt; IO () -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span id="local-6989586621679552670"><span class="annot"><a href="GHC.Event.IntTable.html#indexOf"><span class="hs-identifier hs-type">indexOf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552670"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span></span><span>
</span><span id="line-121"></span><span id="indexOf"><span class="annot"><span class="annottext">indexOf :: forall a. Int -&gt; IT a -&gt; Int
</span><a href="GHC.Event.IntTable.html#indexOf"><span class="hs-identifier hs-var hs-var">indexOf</span></a></span></span><span> </span><span id="local-6989586621679552458"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552458"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span class="hs-special">{</span><span id="local-6989586621679552456"><span id="local-6989586621679552457"><span class="annot"><span class="annottext">Arr (Bucket a)
ForeignPtr Int
tabSize :: ForeignPtr Int
tabArr :: Arr (Bucket a)
tabSize :: forall a. IT a -&gt; ForeignPtr Int
tabArr :: forall a. IT a -&gt; Arr (Bucket a)
</span><a href="#local-6989586621679552456"><span class="hs-glyph hs-var hs-var hs-var hs-var">..</span></a></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552458"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int
forall a. Arr a -&gt; Int
</span><a href="GHC.Event.Arr.html#size"><span class="hs-identifier hs-var">Arr.size</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552457"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">-- | Remove the given key from the table and return its associated value.</span><span>
</span><span id="line-124"></span><span id="local-6989586621679552455"><span class="annot"><a href="GHC.Event.IntTable.html#delete"><span class="hs-identifier hs-type">delete</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-type">IntTable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552455"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552455"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-125"></span><span id="delete"><span class="annot"><span class="annottext">delete :: forall a. Int -&gt; IntTable a -&gt; IO (Maybe a)
</span><a href="GHC.Event.IntTable.html#delete"><span class="hs-identifier hs-var hs-var">delete</span></a></span></span><span> </span><span id="local-6989586621679552454"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552454"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679552453"><span class="annot"><span class="annottext">IntTable a
</span><a href="#local-6989586621679552453"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; Int -&gt; IntTable a -&gt; IO (Maybe a)
forall a. (a -&gt; Maybe a) -&gt; Int -&gt; IntTable a -&gt; IO (Maybe a)
</span><a href="GHC.Event.IntTable.html#updateWith"><span class="hs-identifier hs-var">updateWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe a -&gt; a -&gt; Maybe a
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552454"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">IntTable a
</span><a href="#local-6989586621679552453"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span id="local-6989586621679552624"><span class="annot"><a href="GHC.Event.IntTable.html#updateWith"><span class="hs-identifier hs-type">updateWith</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679552624"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552624"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-type">IntTable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552624"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552624"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-128"></span><span id="updateWith"><span class="annot"><span class="annottext">updateWith :: forall a. (a -&gt; Maybe a) -&gt; Int -&gt; IntTable a -&gt; IO (Maybe a)
</span><a href="GHC.Event.IntTable.html#updateWith"><span class="hs-identifier hs-var hs-var">updateWith</span></a></span></span><span> </span><span id="local-6989586621679552438"><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621679552438"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679552437"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552437"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.IntTable.html#IntTable"><span class="hs-identifier hs-type">IntTable</span></a></span><span> </span><span id="local-6989586621679552436"><span class="annot"><span class="annottext">IORef (IT a)
</span><a href="#local-6989586621679552436"><span class="hs-identifier hs-var">ref</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-129"></span><span>  </span><span id="local-6989586621679552435"><span class="annot"><span class="annottext">it :: IT a
</span><a href="#local-6989586621679552435"><span class="hs-identifier hs-var">it</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Event.IntTable.html#IT"><span class="hs-identifier hs-type">IT</span></a></span><span class="hs-special">{</span><span id="local-6989586621679552433"><span id="local-6989586621679552434"><span class="annot"><span class="annottext">Arr (Bucket a)
ForeignPtr Int
tabSize :: ForeignPtr Int
tabArr :: Arr (Bucket a)
tabSize :: forall a. IT a -&gt; ForeignPtr Int
tabArr :: forall a. IT a -&gt; Arr (Bucket a)
</span><a href="#local-6989586621679552433"><span class="hs-glyph hs-var hs-var hs-var hs-var">..</span></a></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IORef (IT a) -&gt; IO (IT a)
forall a. IORef a -&gt; IO a
</span><a href="GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef (IT a)
</span><a href="#local-6989586621679552436"><span class="hs-identifier hs-var">ref</span></a></span><span>
</span><span id="line-130"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679552432"><span class="annot"><span class="annottext">idx :: Int
</span><a href="#local-6989586621679552432"><span class="hs-identifier hs-var hs-var">idx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IT a -&gt; Int
forall a. Int -&gt; IT a -&gt; Int
</span><a href="GHC.Event.IntTable.html#indexOf"><span class="hs-identifier hs-var">indexOf</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552437"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">IT a
</span><a href="#local-6989586621679552435"><span class="hs-identifier hs-var">it</span></a></span><span>
</span><span id="line-131"></span><span>      </span><span id="local-6989586621679552430"><span class="annot"><span class="annottext">go :: Bucket a -&gt; (Bool, Maybe a, Bucket a)
</span><a href="#local-6989586621679552430"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679552429"><span class="annot"><span class="annottext">bkt :: Bucket a
</span><a href="#local-6989586621679552429"><span class="hs-identifier hs-var">bkt</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Event.IntTable.html#Bucket"><span class="hs-identifier hs-type">Bucket</span></a></span><span class="hs-special">{</span><span id="local-6989586621679552426"><span id="local-6989586621679552427"><span id="local-6989586621679552428"><span class="annot"><span class="annottext">a
Int
Bucket a
bucketNext :: Bucket a
bucketValue :: a
bucketKey :: Int
bucketNext :: forall a. Bucket a -&gt; Bucket a
bucketValue :: forall a. Bucket a -&gt; a
bucketKey :: forall a. Bucket a -&gt; Int
</span><a href="#local-6989586621679552426"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span><span class="hs-special">}</span><span>
</span><span id="line-132"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552428"><span class="hs-identifier hs-var">bucketKey</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552437"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621679552438"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552427"><span class="hs-identifier hs-var">bucketValue</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-133"></span><span>            </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679552425"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552425"><span class="hs-identifier hs-var">val</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679552424"><span class="annot"><span class="annottext">nb :: Bucket a
</span><a href="#local-6989586621679552424"><span class="hs-identifier hs-var hs-var">nb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552429"><span class="hs-identifier hs-var">bkt</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bucketValue :: a
</span><a href="GHC.Event.IntTable.html#bucketValue"><span class="hs-identifier hs-var">bucketValue</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552425"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-134"></span><span>                        </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552427"><span class="hs-identifier hs-var">bucketValue</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552424"><span class="hs-identifier hs-var">nb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span>            </span><span class="annot"><span class="annottext">Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679552427"><span class="hs-identifier hs-var">bucketValue</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552426"><span class="hs-identifier hs-var">bucketNext</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bucket a -&gt; (Bool, Maybe a, Bucket a)
</span><a href="#local-6989586621679552430"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552426"><span class="hs-identifier hs-var">bucketNext</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-137"></span><span>                        </span><span class="hs-special">(</span><span id="local-6989586621679552423"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679552423"><span class="hs-identifier hs-var">fbv</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679552422"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679552422"><span class="hs-identifier hs-var">ov</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679552421"><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552421"><span class="hs-identifier hs-var">nb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679552423"><span class="hs-identifier hs-var">fbv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679552422"><span class="hs-identifier hs-var">ov</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552429"><span class="hs-identifier hs-var">bkt</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">bucketNext :: Bucket a
</span><a href="GHC.Event.IntTable.html#bucketNext"><span class="hs-identifier hs-var">bucketNext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552421"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>      </span><span class="annot"><a href="#local-6989586621679552430"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679552420"><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552420"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552420"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-139"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679552419"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679552419"><span class="hs-identifier hs-var">del</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679552418"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679552418"><span class="hs-identifier hs-var">oldVal</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679552417"><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552417"><span class="hs-identifier hs-var">newBucket</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bucket a -&gt; (Bool, Maybe a, Bucket a)
</span><a href="#local-6989586621679552430"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">(Bucket a -&gt; (Bool, Maybe a, Bucket a))
-&gt; IO (Bucket a) -&gt; IO (Bool, Maybe a, Bucket a)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="GHC.Base.html#liftM"><span class="hs-operator hs-var">`liftM`</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int -&gt; IO (Bucket a)
forall a. Arr a -&gt; Int -&gt; IO a
</span><a href="GHC.Event.Arr.html#read"><span class="hs-identifier hs-var">Arr.read</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552434"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552432"><span class="hs-identifier hs-var">idx</span></a></span><span>
</span><span id="line-140"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe a -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679552418"><span class="hs-identifier hs-var">oldVal</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-141"></span><span>    </span><span class="annot"><span class="annottext">Arr (Bucket a) -&gt; Int -&gt; Bucket a -&gt; IO ()
forall a. Arr a -&gt; Int -&gt; a -&gt; IO ()
</span><a href="GHC.Event.Arr.html#write"><span class="hs-identifier hs-var">Arr.write</span></a></span><span> </span><span class="annot"><span class="annottext">Arr (Bucket a)
</span><a href="#local-6989586621679552434"><span class="hs-identifier hs-var">tabArr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552432"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="annot"><span class="annottext">Bucket a
</span><a href="#local-6989586621679552417"><span class="hs-identifier hs-var">newBucket</span></a></span><span>
</span><span id="line-142"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679552419"><span class="hs-identifier hs-var">del</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-143"></span><span>      </span><span class="annot"><span class="annottext">ForeignPtr Int -&gt; (Ptr Int -&gt; IO ()) -&gt; IO ()
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="GHC.ForeignPtr.html#unsafeWithForeignPtr"><span class="hs-identifier hs-var">unsafeWithForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Int
</span><a href="#local-6989586621679552433"><span class="hs-identifier hs-var">tabSize</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr Int -&gt; IO ()) -&gt; IO ()) -&gt; (Ptr Int -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679552416"><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552416"><span class="hs-identifier hs-var">ptr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-144"></span><span>        </span><span id="local-6989586621679552415"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552415"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ptr Int -&gt; IO Int
forall a. Storable a =&gt; Ptr a -&gt; IO a
</span><a href="Foreign.Storable.html#peek"><span class="hs-identifier hs-var">peek</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552416"><span class="hs-identifier hs-var">ptr</span></a></span><span>
</span><span id="line-145"></span><span>        </span><span class="annot"><span class="annottext">Ptr Int -&gt; Int -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Int
</span><a href="#local-6989586621679552416"><span class="hs-identifier hs-var">ptr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679552415"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-146"></span><span>  </span><span class="annot"><span class="annottext">Maybe a -&gt; IO (Maybe a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679552418"><span class="hs-identifier hs-var">oldVal</span></a></span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span></pre></body></html>